package com.zhuss.repair.processor;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.repair.repair.SearchRepairBo;
import com.zhuss.bean.vo.core.user.ListUserVo;
import com.zhuss.bean.vo.repair.repair.KanchaQTVo;
import com.zhuss.bean.vo.repair.repair.ListRepairVo;
import com.zhuss.bean.vo.repair.repair.RepairKanchaVo;
import com.zhuss.common.PageVo;
import com.zhuss.exception.WpsException;
import com.zhuss.exception.ExceptionCode;
import com.zhuss.repair.db.dao.ext.RepairHeChaDao;
import com.zhuss.repair.db.dao.ext.RepairKanchaDao;
import com.zhuss.repair.db.dao.ext.RepairDao;
import com.zhuss.repair.db.dao.ext.RepairWeiXiuDao;
import com.zhuss.repair.db.entity.Repair;


/**
 * 查询餐品 processor
 * @Author: hxx
 * @Date: 2020/02/28 16:01
 */
@Component("repairHeChaRead")
public class RepairHeChaRead {
	
    @Autowired
    private RepairHeChaDao repairHeChaDao;
	
	
	/**
	 * 报修单详情
	 */
	public Object detail(Integer repair_id) throws WpsException {
		/*RepairKanchaVo result = repairKanchaDao.getRepair_kanchaByid(repair_id);
		if (result == null) {
			throw new WpsException(ExceptionCode.数据不存在);
		}
		List<KanchaQTVo> qtList = repairKanchaDao.getRepair_kancha_qt(repair_id);
		result.setQtList(qtList);
		return result;*/
		return null;
	}
	
	/**
	 * 报修单列表
	 * @param 时间段
	 * @param 内容
	 */
	public Object list(SearchRepairBo bo) {
		PageVo<ListRepairVo> result = new PageVo<ListRepairVo>();
		result.setPageNum(bo.getPageNum());
        result.setPageSize(bo.getPageSize());
        result.setItems(repairHeChaDao.list(bo));
        result.setTotal(repairHeChaDao.countList(bo));
		return result;
	}



}
